 // 数据处理：保存

import React, { Component } from 'react';
import { Col, Form, Input,Radio, Row } from 'antd';
import './modal.css';
import PropTypes from 'prop-types';



class SaveDoc extends Component {
  
  static propTypes = {
    setForm: PropTypes.func.isRequired,
  };

  formRef = React.createRef();

  componentDidMount() {
    this.props.setForm(this.formRef);
  }

  render() {
    return (
      <Form 
        ref={this.formRef}   
        name="control-ref" 
        onFinish={this.onFinish}  
        // initialValues={{
        //   radio_group: "data"
        // }}
      > 
        {/* <p>保存范围</p> */}
        <Row>
          <Col span={2}></Col>
          <Col span={22}>
            <Form.Item name="radio_group" label="保存类型" rules={[{ required: true,message:"请选择保存类型！" }]}>
              {/* <Row>
                <Col span={4}></Col>
                <Col span={16}> */}
                  <Radio.Group>
                    <Radio value="data">仅数据</Radio>
                    <Radio value="mb">仅模板</Radio>
                    <Radio value="data+mb">绘图文件</Radio>
                  </Radio.Group>
                {/* </Col>
              </Row> */}
            </Form.Item>
          </Col>
        </Row>
          
      </Form>
    );
  }
}

export default SaveDoc;